package sketch.experiment.sketchguidedrandom;

import java.io.File;
import java.util.LinkedList;
import java.util.List;

import randoop.util.Reflection;
import sketch.ounit.fuzz.SketchGuidedRandomTestGenerator;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

public class SketchGuidedJapaTest extends TestCase {
	
	public static Test suite() {
		return new TestSuite(SketchGuidedJapaTest.class);
	}
	
	public void testSimplestMulti() {
		String filePath = "./tmp/JapaConstrainTest.java";
		String junitclass = "JapaConstrainTest";
		String classFile = "./subjects/sketchguided/japa/japaclasses.txt";
		int timelimit = 5;
		
		List<Class<?>> classes = null;//new LinkedList<Class<?>>();
		try {
		    classes = Reflection.loadClassesFromFile(new File(classFile));
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
		
		SketchGuidedRandomTestGenerator generator = new SketchGuidedRandomTestGenerator(filePath, junitclass, timelimit, timelimit, classes);
		generator.setMaxTestNum(2000);
		generator.setUseRR(true);
		generator.setOutputPackageName("sketchguided.japa.autogenerated");
		generator.generate_tests();
	}
	
}
